package com.CmJava.sqlSessionFactoryBuilder.sqlSessionFactory.configuration.mapperConfig.mapperRegister.mapperProxy;

import com.CmJava.session.SqlSession;

import java.lang.reflect.Method;
import java.util.List;

//这个类是映射接口的方法对应那个sql，这里简化书写，传了mappedStatements的key来获取sql
public class MapperMethod {
    private String id;

    public MapperMethod(String id) {
        this.id = id;
    }

    public Object execute(SqlSession sqlSession, Object[] args) {
        return sqlSession.selectOne(id, args[0]);
    }
}
